FROM php:7.4-apache

RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list

RUN docker-php-source extract

RUN apt-get update && \
	apt-get install -y --no-install-recommends libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \
	rm -r /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd

RUN apt-get update && \
	apt-get install -y --no-install-recommends libzip-dev && \
	rm -r /var/lib/apt/lists/*
RUN docker-php-ext-configure zip
RUN docker-php-ext-install zip

RUN docker-php-ext-configure mysqli
RUN docker-php-ext-install mysqli

RUN docker-php-source delete

LABEL Author="php"
LABEL Version="7.4-apache-gd-zip-mysqli"
LABEL Description="7.4-apache-gd-zip-mysqli"

# docker build -t "php:7.4-apache-gd-zip-mysqli" .

